<template>
  <div class="container">
    <van-row>
      <van-col span="6" class="img-container">
        <img :src="value.matrImageUrl" class="matr-img"/>
      </van-col>
      <van-col span="12" class="matr">
        <div class="name">{{value.matrName}}</div>
        <div class="spec">{{value.matrSpec}}</div>
        <div class="lot">
          {{value.lot}}<span class="exp">Exp</span>{{value.expDate | formatDate("yyyy-MM-dd")}}
        </div>
      </van-col>
      <van-col span="6"  class="matr">
        <div class="qty">   {{value.packageQty}} {{value.packageUnit}}</div>
        <div class="qty">{{value.skuQty}} {{value.skuUnit}}</div>
        <div class="price">￥ {{value.amount}}</div>
      </van-col>
    </van-row>
  </div>
</template>
<script>
export default {
  data() {
    return {

    }
  },
  props: {
    value: Object
  },
  created() {
  },
  computed: {

  },
  methods: {

  }
}
</script>
<style lang="scss" scoped>
  $line-height:25px;
  .container {
    background-color: white;
    padding:5px;
    border-radius: 5px;
  }
  .img-container {
    height: 75px;
    display: flex;
    align-items: center;
  }
  .matr-img {
    width:64px;
    height:64px;
  }
  .matr {
    line-height: $line-height;
    text-align: left;
    font-size: 12px;
    text-overflow:ellipsis;//文字隐藏后添加省略号
    white-space:nowrap;//强制不换行
    .spec, .lot {
      color:#2f2f2f;
    }
    .name {
      font-weight: bold;
      color:#1f1f1f;
    }
    .qty {
      color:#2f2f2f;
      text-align: right;
    }
    .price {
      color:#2f2f2f;
      text-align: right;
    }
  }
  .exp {
    font-size: 8px;
    background-color: lightgreen;
    color: white;
    padding: 2px;
    margin:5px;
  }
  .matr-qty {
    line-height: $line-height;
    font-size: 12px;
    color:#2f2f2f;
    text-align: right;
  }
  .matr-uc {
    line-height: $line-height;
    font-size: 12px;
    color:#2f2f2f;
    text-align: left;
  }
  .align-right {
    text-align: right;
  }
</style>
